package com.bw.jigou.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bw.jigou.domain.Jigou;
import com.bw.jigou.domain.JigouVo;
import com.bw.jigou.domain.JigouVo2;
import com.bw.jigou.service.JigouService;
import com.bw.jigou.mapper.JigouMapper;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
* @author 86198
* @description 针对表【jigou】的数据库操作Service实现
* @createDate 2024-04-22 09:03:18
*/
@Service
public class JigouServiceImpl extends ServiceImpl<JigouMapper, Jigou>
    implements JigouService{

    @Override
    public List<String[]> exchart() {
        List<String[]> list = new ArrayList<>();

        JigouVo getname = baseMapper.getname();
        list.add(("product,"+getname.getName()).split(","));

        List<JigouVo2> getnum = baseMapper.getnum();
        for (JigouVo2 jigouVo2 : getnum) {
            list.add((jigouVo2.getXdata()+","+jigouVo2.getYdata()).split(","));
        }
        return list;
    }
}




